package com.carltechnology.mahjonggamecaculation.base;

import rx.Subscriber;

/**
 * Created by WZTCM on 2016/6/28.
 * the base subscriber for our asynchronous RxJava.
 * When we call  onCompleted.The subscriber is unsubscribe.
 */
public abstract class MyAbstractSubscriber<T> extends Subscriber<T>{
    @Override
    public void onCompleted() {
        unsubscribe();
    }

    @Override
    public void onError(Throwable e) {
        e.printStackTrace();
        unsubscribe();
    }
}
